]> git.r.bdr.sh - rbdr/super-polarity/blobdiff - Super Polarity/InputController.cs
Stuffffffff
[rbdr/super-polarity] / Super Polarity / InputController.cs
index ad07717b11c279778e35b72a1cde538692ff7081..79bd0391bedb6e0b077365021dc57ce5a7022f09 100644 (file)
@@ -88,8 +88,8 @@ namespace SuperPolarity
                     {
                         if (!BlockedKeys.Contains(entry.Key))
                         {
-                            Dispatch(entry.Key, 1);
                             BlockedKeys.Add(entry.Key);
+                            Dispatch(entry.Key, 1);
                         }
                         keyFired = true;
                         break;
@@ -111,8 +111,8 @@ namespace SuperPolarity
                     {
                         if (!BlockedButtons.Contains(entry.Key))
                         {
-                            Dispatch(entry.Key, 1);
                             BlockedButtons.Add(entry.Key);
+                            Dispatch(entry.Key, 1);
                         }
                         keyFired = true;
                         break;
@@ -192,5 +192,11 @@ namespace SuperPolarity
                 method(value);
             }
         }
+
+        public static void Unlock(string eventName)
+        {
+            BlockedButtons.Remove(eventName);
+            BlockedKeys.Remove(eventName);
+        }
     }
 }